<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title><ui:insert name="titulo">Prime_Scrum</ui:insert></title>
	<!--  <h:outputStylesheet name="style.css" />-->
	<link rel="shortcut icon" href="./images/primescrum.ico" />
	<link href="./css/login.css" type="text/css" rel="stylesheet"/>
	
</h:head>
<h:body>

	<p:layout fullPage="true">

		<p:layoutUnit position="north" size="75" header="Prime Scrum"
			resizable="false" closable="false" collapsible="false" style="text-align:center;">
			<p:commandButton value="Login" oncomplete="PF('dlgLogin').show();"/>
			<p:commandButton value="Cadastrar-se" oncomplete="PF('dlgNewSm').show();"/>
			<a id="download" href="download/Prime_Scrum.rar">Baixe uma cópia do Framework Prime Scrum</a>
		</p:layoutUnit>

		<p:layoutUnit position="center">
			
			<ui:insert name="content">
				
				<p:graphicImage value="/images/Logo/Logo.png" alt="Prime Scrum" title="Prime Scrum"/>
				
				
				<p:galleria value="#{carrouselController.images}" var="image" panelWidth="700" panelHeight="313" showCaption="true">
    				<p:graphicImage value="/images/carrousel/#{image.nome}" alt="#{image.descricao}" title="#{image.titulo}"/>
				</p:galleria>
				
				<p:panel showCaption="true">
					<h2>O que é o Prime Scrum ?</h2>
					<p:outputLabel>
						Prime Scrum é um framework para gerenciamento de projetos desenvolvidos seguindo a metodologia ágil Scrum<br></br><br></br>
						Conta com Task Board, Burn Down Chart, Planning entre outros componentes do Scrum <br></br><br></br>
						Conta tambem com um controle de acesso para Gerentes, desenvolvedores e Clientes onde cada um poderá acompanhar o andamento do projeto e realizar alterações de acordo com suas permissões.<br></br><br></br>
						Experimente o Prime Scrum, ele é Livre!!!
					</p:outputLabel>
				</p:panel>
				
				<p:panel>
				<h3>Tecnologias Utilizadas</h3>
				<p:galleria value="#{carrouselController.tecnologias}" var="tech" panelWidth="315" panelHeight="210" showCaption="true">
    				<p:graphicImage value="/images/technology/#{tech.nome}" alt="#{tech.descricao}" title="#{tech.titulo}" />
				</p:galleria>
				</p:panel>
				
				
			
			</ui:insert>
		</p:layoutUnit>

		<p:layoutUnit position="south" size="45" resizable="false"
			closable="false" collapsible="false">
			<p:outputLabel id="labelLink">Desenvolvido por: </p:outputLabel> <a id="link" href="https://github.com/Barrostsb" target="_blank"> THIAGO BARROS © </a>
		</p:layoutUnit>
		
		<p:dialog id="dialogLogin" widgetVar="dlgLogin" showEffect="clip"
						hideEffect="clip" modal="true" appendTo="@(body)" width="28 0"
						height="150">
		<h:form styleClass="loginPanelStyle" >
	
		<p:growl id="msgs" showDetail="true" sticky="false" />
		
			<p:panelGrid columns="2">
				<f:facet name="header">Prime Scrum Login</f:facet>
				<h:outputText for="j_username" value="Login : "></h:outputText>
				<p:inputText id="j_username" value="#{loginController.username}"  required="true"  requiredMessage="Please Enter Username!" message="fc">
					<f:validateLength minimum="1" />
				</p:inputText>
				<h:outputText for="j_password" value="Senha : "></h:outputText>
				<p:password id="j_password" value="#{loginController.password}"  required="true"
					requiredMessage="Please Enter password!">
					<f:validateLength minimum="1" />
				</p:password>
				<f:facet name="footer" >
					<p:commandButton value="Entrar" update="msgs"  actionListener="#{loginController.login}"  type="submit"	icon="ui-icon-check" style="margin:0"/>
				</f:facet>
			</p:panelGrid>
		</h:form>
		<div id="loader" class="loader" align="center"> 
			<img width="50px" height="50px" src="./images/loading.gif"/> 
		</div>
	</p:dialog>
		
		<p:dialog id="dialog" widgetVar="dlgNewSm" showEffect="clip"
						hideEffect="clip" modal="true" appendTo="@(body)" width="600"
						height="320">

						<h:form id="formDialog">
							<h:panelGrid columns="2" cellpadding="10" styleClass="panelGrid"
						id="grid0">

						<h:outputLabel />
						<h:inputHidden id="idScrumMaster" value="#{scrumMasterController.scrumMaster.id_pessoa}" />
							
						<h:outputLabel for="nomeScrumMaster" value="Nome.:" />

						<p:inputText id="nomeScrumMaster" size="40"
							value="#{scrumMasterController.scrumMaster.nome}"
							onkeyup="this.value = this.value.toUpperCase()" required="true"
							requiredMessage="O Campo Nome é Obrigatório!">
						</p:inputText>
						
						<h:outputLabel for="loginScrumMaster" value="login.:" />
						<p:inputText id="loginScrumMaster" size="40"
							value="#{scrumMasterController.scrumMaster.login}"
							required="true"
							requiredMessage="O Campo Login é Obrigatório!">
						</p:inputText>
						
						<h:outputLabel for="senhaScrumMaster" value="Senha.:" />
						<p:password id="senhaScrumMaster" size="40"
							value="#{scrumMasterController.scrumMaster.senha}" match="confirmarSenha"
							required="true"
							requiredMessage="O Campo Senha é Obrigatório!"
							validatorMessage="As senhas devem ser iguais!">
						</p:password>
						
						<h:outputLabel for="confirmarSenha" value="Confirmar Senha.:" />
						<p:password id="confirmarSenha" size="40"
							value="#{scrumMasterController.scrumMaster.senha}"
							required="true"
							requiredMessage="O Campo de confirmação de senha é Obrigatório!">
						</p:password>


						<p:panel>
							<p:commandButton value="Salvar"
								action="#{scrumMasterController.salvar}"
								image="ui-icon ui-icon-disk" update="@form">
							</p:commandButton>

							<p:commandButton value="Limpar"
								actionListener="#{scrumMasterController.clear}"
								image="ui-icon ui-icon-close" update="@form">
							</p:commandButton>
						</p:panel>
					</h:panelGrid>
						</h:form>
					</p:dialog>
	</p:layout>

	<script type="text/javascript" src="./js/script.js"/>
</h:body>
</html>
